const crawler = require('../../libs/crawler'),
      { crawlerConf } = require('../../config/config');

crawler({

  url: crawlerConf.url.main,  //修改
  callback () {
    const $ = window.$,
          $item = $('.stu');  //修改
    
    const data = [];

    $item.each((index, item) => {
      const $el = $(item);
          
      const dataItem = {
        sid: index +1,
        studentImgUrl: $el.find('.stu-img').prop('src'),
        studentName: $el.find('.stu-img').prop('alt'),
        intro: $el.find('.stu-main-cnt').text(),
        courseName: $el.find('.stu-main-tit').prop('title'),
        courseLink: $el.find('.stu-main-tit').prop('href'),
        studentImgKey: ''
      };

      data.push(dataItem);
    }); 

    return data;
  }

})